Rem 2009.4. 22. 18:20

CREATE TABLE  "ARFOLYAMOK" 
   (	"SORSZAM" NUMBER(10,0) NOT NULL ENABLE, 
	"DATUM" NUMBER(8,0) NOT NULL ENABLE, 
	"DEVIZANEM" VARCHAR2(25) NOT NULL ENABLE, 
	"VETEL" NUMBER(8,2) NOT NULL ENABLE, 
	"ELADAS" NUMBER(8,2) NOT NULL ENABLE, 
	 CONSTRAINT "ARFOLYAMOK_CK1" CHECK (vetel > 0) ENABLE, 
	 CONSTRAINT "ARFOLYAMOK_CK2" CHECK (eladas > vetel) ENABLE, 
	 CONSTRAINT "ARFOLYAMOK_PK" PRIMARY KEY ("SORSZAM") ENABLE
   )
/
CREATE TABLE  "ATM" 
   (	"SORSZAM" NUMBER(10,0) NOT NULL ENABLE, 
	"CIM" VARCHAR2(100) NOT NULL ENABLE, 
	 CONSTRAINT "ATM_PK" PRIMARY KEY ("SORSZAM") ENABLE
   )
/
CREATE TABLE  "BANKKARTYAKONDICIOK" 
   (	"KARTYAKONDKOD" VARCHAR2(20) NOT NULL ENABLE, 
	"NEV" VARCHAR2(30) NOT NULL ENABLE, 
	"ERVENYESSEG" NUMBER(2,0) NOT NULL ENABLE, 
	"EVESDIJ" NUMBER(6,0) NOT NULL ENABLE, 
	"LETILTAS" NUMBER(6,0) NOT NULL ENABLE, 
	"VASARLAS" NUMBER(6,0) NOT NULL ENABLE, 
	"ATMFORINT" NUMBER(6,0) NOT NULL ENABLE, 
	"ATMDEVIZA" NUMBER(6,0) NOT NULL ENABLE, 
	"BEFIZAZONOSOS" NUMBER(4,2) NOT NULL ENABLE, 
	"BEFIZKONVERZIO" NUMBER(4,2) NOT NULL ENABLE, 
	 CONSTRAINT "BANKKARTYAKONDICIOK_PK" PRIMARY KEY ("KARTYAKONDKOD") ENABLE
   )
/
CREATE TABLE  "BANKSZAMLAKONDICIOK" 
   (	"SZAMLAKONDKOD" VARCHAR2(20) NOT NULL ENABLE, 
	"NEV" VARCHAR2(30) NOT NULL ENABLE, 
	"PENZNEM" VARCHAR2(25) NOT NULL ENABLE, 
	"KAMATLAB" NUMBER(4,2) NOT NULL ENABLE, 
	"VEZETESIDIJ" NUMBER(6,0) NOT NULL ENABLE, 
	"FORINTJOVAIRAS" NUMBER(4,2) NOT NULL ENABLE, 
	"DEVIZAJOVAIRAS" NUMBER(4,2) NOT NULL ENABLE, 
	"FORINTATUTALAS" NUMBER(4,2) NOT NULL ENABLE, 
	"DEVIZAATUTALAS" NUMBER(4,2) NOT NULL ENABLE, 
	"PENZFELVETEL" NUMBER(4,2) NOT NULL ENABLE, 
	 CONSTRAINT "BANKSZAMLAKONDICIOK_PK" PRIMARY KEY ("SZAMLAKONDKOD") ENABLE
   )
/
CREATE TABLE  "UGYFEL" 
   (	"SZIGSZAM" VARCHAR2(15) NOT NULL ENABLE, 
	"NEV" VARCHAR2(50) NOT NULL ENABLE, 
	"LAKCIM" VARCHAR2(100) NOT NULL ENABLE, 
	"SZULDATUM" NUMBER(8,0) NOT NULL ENABLE, 
	"TELEFONSZAM" NUMBER(15,0), 
	 CONSTRAINT "UGYFEL_PK" PRIMARY KEY ("SZIGSZAM") ENABLE
   )
/
CREATE TABLE  "BANKSZAMLA" 
   (	"SZAMLASZAM" NUMBER(24,0) NOT NULL ENABLE, 
	"TULAJDONOS" VARCHAR2(15) NOT NULL ENABLE, 
	"SZAMLAKONDKOD" VARCHAR2(20) NOT NULL ENABLE, 
	"EGYENLEG" NUMBER(23,2) NOT NULL ENABLE, 
	"ZAROLVA" NUMBER(1,0) NOT NULL ENABLE, 
	 CONSTRAINT "BANKSZAMLA_PK" PRIMARY KEY ("SZAMLASZAM") ENABLE, 
	 CONSTRAINT "BANKSZAMLA_FK" FOREIGN KEY ("TULAJDONOS")
	  REFERENCES  "UGYFEL" ("SZIGSZAM") ENABLE, 
	 CONSTRAINT "BANKSZAMLA_FK2" FOREIGN KEY ("SZAMLAKONDKOD")
	  REFERENCES  "BANKSZAMLAKONDICIOK" ("SZAMLAKONDKOD") ENABLE
   )
/
CREATE TABLE  "BANKKARTYA" 
   (	"KARTYASZAM" NUMBER(24,0) NOT NULL ENABLE, 
	"SZAMLASZAM" NUMBER(24,0) NOT NULL ENABLE, 
	"KARTYAKONDKOD" VARCHAR2(20) NOT NULL ENABLE, 
	"ERVENYESSEG" NUMBER(4,0) NOT NULL ENABLE, 
	"PIN" NUMBER(4,0) NOT NULL ENABLE, 
	"ZAROLVA" NUMBER(1,0) NOT NULL ENABLE, 
	 CONSTRAINT "BANKKARTYA_PK" PRIMARY KEY ("KARTYASZAM") ENABLE, 
	 CONSTRAINT "BANKKARTYA_FK" FOREIGN KEY ("SZAMLASZAM")
	  REFERENCES  "BANKSZAMLA" ("SZAMLASZAM") ON DELETE CASCADE ENABLE, 
	 CONSTRAINT "BANKKARTYA_FK2" FOREIGN KEY ("KARTYAKONDKOD")
	  REFERENCES  "BANKKARTYAKONDICIOK" ("KARTYAKONDKOD") ENABLE
   )
/
CREATE TABLE  "HITELKONDICIOK" 
   (	"HITELKONDKOD" VARCHAR2(20) NOT NULL ENABLE, 
	"NEV" VARCHAR2(30) NOT NULL ENABLE, 
	"THM" NUMBER(4,2) NOT NULL ENABLE, 
	 CONSTRAINT "HITELKONDICIOK_PK" PRIMARY KEY ("HITELKONDKOD") ENABLE
   )
/
CREATE TABLE  "HITEL" 
   (	"HITELSZAM" NUMBER(24,0) NOT NULL ENABLE, 
	"SZAMLASZAM" NUMBER(24,0) NOT NULL ENABLE, 
	"HITELKONDKOD" VARCHAR2(20) NOT NULL ENABLE, 
	"DATUM" NUMBER(8,0) NOT NULL ENABLE, 
	"FUTAMIDO" NUMBER(3,0) NOT NULL ENABLE, 
	"OSSZEG" NUMBER(23,0) NOT NULL ENABLE, 
	 CONSTRAINT "HITEL_CK1" CHECK (osszeg > 0) ENABLE, 
	 CONSTRAINT "HITEL_PK" PRIMARY KEY ("HITELSZAM") ENABLE, 
	 CONSTRAINT "HITEL_FK" FOREIGN KEY ("SZAMLASZAM")
	  REFERENCES  "BANKSZAMLA" ("SZAMLASZAM") ON DELETE CASCADE ENABLE, 
	 CONSTRAINT "HITEL_FK2" FOREIGN KEY ("HITELKONDKOD")
	  REFERENCES  "HITELKONDICIOK" ("HITELKONDKOD") ENABLE
   )
/
CREATE TABLE  "HITELKARTYAKONDICIOK" 
   (	"KARTYAKONDKOD" VARCHAR2(20) NOT NULL ENABLE, 
	"NEV" VARCHAR2(30) NOT NULL ENABLE, 
	"ERVENYESSEG" NUMBER(2,0) NOT NULL ENABLE, 
	"EVESDIJ" NUMBER(6,0) NOT NULL ENABLE, 
	"LETILTAS" NUMBER(6,0) NOT NULL ENABLE, 
	"FIZETESFORINT" NUMBER(6,0) NOT NULL ENABLE, 
	"FIZETESDEVIZA" NUMBER(6,0) NOT NULL ENABLE, 
	"BEFIZAZONOS" NUMBER(4,2) NOT NULL ENABLE, 
	"BEFIZKONVERZIO" NUMBER(4,2) NOT NULL ENABLE, 
	"MINIMUMKERET" NUMBER(23,2) NOT NULL ENABLE, 
	"KAMAT" NUMBER(4,2) NOT NULL ENABLE, 
	"HITELKAMAT" NUMBER(4,2) NOT NULL ENABLE, 
	"EVESTHM" NUMBER(4,2) NOT NULL ENABLE, 
	 CONSTRAINT "HITELKARTYAKONDICIOK_PK" PRIMARY KEY ("KARTYAKONDKOD") ENABLE
   )
/
CREATE TABLE  "HITELKARTYA" 
   (	"KARTYASZAM" NUMBER(24,0) NOT NULL ENABLE, 
	"SZAMLASZAM" NUMBER(24,0) NOT NULL ENABLE, 
	"KARTYAKONDKOD" VARCHAR2(20) NOT NULL ENABLE, 
	"ERVENYESSEG" NUMBER(4,0) NOT NULL ENABLE, 
	"PIN" NUMBER(4,0) NOT NULL ENABLE, 
	"ZAROLVA" NUMBER(1,0) NOT NULL ENABLE, 
	 CONSTRAINT "HITELKARTYA_PK" PRIMARY KEY ("KARTYASZAM") ENABLE, 
	 CONSTRAINT "HITELKARTYA_FK" FOREIGN KEY ("SZAMLASZAM")
	  REFERENCES  "BANKSZAMLA" ("SZAMLASZAM") ON DELETE CASCADE ENABLE, 
	 CONSTRAINT "HITELKARTYA_FK2" FOREIGN KEY ("KARTYAKONDKOD")
	  REFERENCES  "HITELKARTYAKONDICIOK" ("KARTYAKONDKOD") ENABLE
   )
/
CREATE TABLE  "UGYINTEZO" 
   (	"SZIGSZAM" VARCHAR2(15) NOT NULL ENABLE, 
	"NEV" VARCHAR2(50) NOT NULL ENABLE, 
	"LAKCIM" VARCHAR2(100) NOT NULL ENABLE, 
	"SZULDATUM" NUMBER(8,0) NOT NULL ENABLE, 
	"TELEFONSZAM" NUMBER(15,0), 
	"ADMIN_E" NUMBER(1,0) NOT NULL ENABLE, 
	 CONSTRAINT "UGYINTEZO_PK" PRIMARY KEY ("SZIGSZAM") ENABLE
   )
/
CREATE TABLE  "JELSZAVAK" 
   (	"AZONOSITO" VARCHAR2(15) NOT NULL ENABLE, 
	"SZIGSZAM" VARCHAR2(15) NOT NULL ENABLE, 
	"JELSZO" VARCHAR2(30) NOT NULL ENABLE, 
	 CONSTRAINT "JELSZAVAK_CK1" CHECK (length(jelszo)>=8) ENABLE, 
	 CONSTRAINT "JELSZAVAK_PK" PRIMARY KEY ("AZONOSITO") ENABLE, 
	 CONSTRAINT "JELSZAVAK_FK" FOREIGN KEY ("SZIGSZAM")
	  REFERENCES  "UGYINTEZO" ("SZIGSZAM") ENABLE
   )
/
CREATE TABLE  "POS_TERMINAL" 
   (	"SORSZAM" NUMBER(10,0) NOT NULL ENABLE, 
	"SZAMLASZAM" NUMBER(24,0) NOT NULL ENABLE, 
	"CIM" VARCHAR2(100) NOT NULL ENABLE, 
	 CONSTRAINT "POS_TERMINAL_PK" PRIMARY KEY ("SORSZAM") ENABLE, 
	 CONSTRAINT "POS_TERMINAL_FK" FOREIGN KEY ("SZAMLASZAM")
	  REFERENCES  "BANKSZAMLA" ("SZAMLASZAM") ON DELETE CASCADE ENABLE
   )
/
CREATE TABLE  "TRANZAKCIOK" 
   (	"SORSZAM" NUMBER(15,0) NOT NULL ENABLE, 
	"FORRAS" NUMBER(24,0), 
	"CEL" NUMBER(24,0), 
	"ARFOLYAMSORSZAM" NUMBER(10,0) NOT NULL ENABLE, 
	"DEVIZANEM" VARCHAR2(25) NOT NULL ENABLE, 
	"POS" NUMBER(10,0), 
	"ATM" NUMBER(10,0), 
	"UGYINTEZO" VARCHAR2(15), 
	"DATUM" NUMBER(8,0) NOT NULL ENABLE, 
	"OSSZEG" NUMBER(23,2) NOT NULL ENABLE, 
	 CONSTRAINT "TRANZAKCIOK_PK" PRIMARY KEY ("SORSZAM") ENABLE, 
	 CONSTRAINT "TRANZAKCIOK_TIPUS" CHECK ( "ATM" is not null or "POS" is not null or "UGYINTEZO" is not null) ENABLE, 
	 CONSTRAINT "TRANZAKCIOK_SZAMLA" CHECK ( "FORRAS" is not null or "CEL" is not null) ENABLE, 
	 CONSTRAINT "TRANZAKCIOK_FK" FOREIGN KEY ("FORRAS")
	  REFERENCES  "BANKSZAMLA" ("SZAMLASZAM") ON DELETE SET NULL ENABLE, 
	 CONSTRAINT "TRANZAKCIOK_FK2" FOREIGN KEY ("CEL")
	  REFERENCES  "BANKSZAMLA" ("SZAMLASZAM") ON DELETE SET NULL ENABLE, 
	 CONSTRAINT "TRANZAKCIOK_FK4" FOREIGN KEY ("POS")
	  REFERENCES  "POS_TERMINAL" ("SORSZAM") ON DELETE SET NULL ENABLE, 
	 CONSTRAINT "TRANZAKCIOK_FK5" FOREIGN KEY ("ATM")
	  REFERENCES  "ATM" ("SORSZAM") ON DELETE SET NULL ENABLE, 
	 CONSTRAINT "TRANZAKCIOK_FK3" FOREIGN KEY ("ARFOLYAMSORSZAM")
	  REFERENCES  "ARFOLYAMOK" ("SORSZAM") ENABLE, 
	 CONSTRAINT "TRANZAKCIOK_FK6" FOREIGN KEY ("UGYINTEZO")
	  REFERENCES  "UGYINTEZO" ("SZIGSZAM") ENABLE
   )
/

Rem No function found to generate DDL.

Rem No index found to generate DDL.

Rem No package found to generate DDL.

Rem No procedure found to generate DDL.

 CREATE SEQUENCE   "TRANZAKCIOK_SEQ"  MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 41 CACHE 20 NOORDER  NOCYCLE
/
 CREATE SEQUENCE   "SZAMLASZAM"  MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 3,61263016725000E+23 NOCACHE  NOORDER  NOCYCLE
/
 CREATE SEQUENCE   "POS_TERMINAL_SEQ"  MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER  NOCYCLE
/
 CREATE SEQUENCE   "KARTYASZAM"  MINVALUE 1 MAXVALUE 361957364701304299999999 INCREMENT BY 1 START WITH 3,61957364701304E+23 NOCACHE  NOORDER  NOCYCLE
/
 CREATE SEQUENCE   "HITEL_SEQ"  MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER  NOCYCLE
/
 CREATE SEQUENCE   "ATM_SEQ"  MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER  NOCYCLE
/
 CREATE SEQUENCE   "ARFOLYAMOK_SEQ"  MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER  NOCYCLE
/

Rem No synonym found to generate DDL.

CREATE OR REPLACE TRIGGER  "TRANZAKCIOK_TKULCS" 
BEFORE
insert on "TRANZAKCIOK"
for each row
begin
select "TRANZAKCIOK_SEQ".nextval into :NEW.SORSZAM from dual;
end;
/
ALTER TRIGGER  "TRANZAKCIOK_TKULCS" ENABLE
/
CREATE OR REPLACE TRIGGER  "POS_TERMINAL_TKULCS" 
BEFORE
insert on "POS_TERMINAL"
for each row
begin
select "POS_TERMINAL_SEQ".nextval into :NEW.SORSZAM from dual;
end;
/
ALTER TRIGGER  "POS_TERMINAL_TKULCS" ENABLE
/
CREATE OR REPLACE TRIGGER  "HITEL_TKULCS" 
BEFORE
insert on "HITEL"
for each row
begin
select "HITEL_SEQ".nextval into :NEW.HITELSZAM from dual;
end;
/
ALTER TRIGGER  "HITEL_TKULCS" ENABLE
/
CREATE OR REPLACE TRIGGER  "HITELKARTYA_TKULCS" 
BEFORE
insert on "HITELKARTYA"
for each row
begin
select "KARTYASZAM".nextval into :NEW.KARTYASZAM from dual;
end;
/
ALTER TRIGGER  "HITELKARTYA_TKULCS" ENABLE
/
CREATE OR REPLACE TRIGGER  "BANKSZAMLA_TKULCS" 
BEFORE
insert on "BANKSZAMLA"
for each row
begin
select "SZAMLASZAM".nextval into :NEW.SZAMLASZAM from dual;
end;
/
ALTER TRIGGER  "BANKSZAMLA_TKULCS" ENABLE
/
CREATE OR REPLACE TRIGGER  "BANKKARTYA_TKULCS" 
BEFORE
insert on "BANKKARTYA"
for each row
begin
select "KARTYASZAM".nextval into :NEW.KARTYASZAM from dual;
end;
/
ALTER TRIGGER  "BANKKARTYA_TKULCS" ENABLE
/
CREATE OR REPLACE TRIGGER  "ATM_TKULCS" 
BEFORE
insert on "ATM"
for each row
begin
select "ATM_SEQ".nextval into :NEW.SORSZAM from dual;
end;
/
ALTER TRIGGER  "ATM_TKULCS" ENABLE
/
CREATE OR REPLACE TRIGGER  "ARFOLYAMOK_TKULCS" 
BEFORE
insert on "ARFOLYAMOK"
for each row
begin
select "ARFOLYAMOK_SEQ".nextval into :NEW.SORSZAM from dual;
end;
/
ALTER TRIGGER  "ARFOLYAMOK_TKULCS" ENABLE
/

Rem No view found to generate DDL.